import { useDrag } from 'react-dnd'
import styled from 'styled-components'

const DragAbleTag = styled.div`
  background-color: wheat;
  padding: 5px 10px;
  text-align: center;
`
const ImageDragAble = () => {
  const [{ isDraging }, ref] = useDrag({
    type: 'page',
    item: {
      id: 1,
      type: 'image',
      url: 'https://leuan.top/files/2023/04/21/132d74cc-df9e-4cb7-abb5-a42d75ae42a86207370171519441715.jpg',
      href: 'http://leuan.top',
    },
  })
  return <DragAbleTag ref={ref}>图片组件</DragAbleTag>
}

export default ImageDragAble
